<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>mydemo</title>
</head>
<style>
    pre {color:green;padding:10px 15px;background:#f0f0f0;border:1px dotted #333;font:12px/1.5 Courier New;}
    span {color:#999;}
</style>
<script>
   document.oncontextmenu = function() {
            return false;
    } 
</script>
<body>
<pre>
    &lt;script type="text/javasript"&gt;
    <span>//※oncontextmenu</span>
    document.oncontextmenu = function() {
    return false;
    }
    &lt;/script&gt;
</pre>
</body>
</html>